package com.fjec.devops.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.devops.entity.BizExchangeGiftExcel;
import com.fjec.common.protocol.JsonResult;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.util.Map;

/**
 * <p>
 * 012.礼物兑换Excel下载表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-12-08
 */
public interface IBizExchangeGiftExcelService extends IService<BizExchangeGiftExcel> {

    /**
     * 查询这一天文件是否已生成
     *
     * @param date
     * @return
     */
    boolean dateIsHandled(LocalDate date);

    /**
     * 生成兑换礼物列表excel
     *
     * @param date
     * @return
     */
    void uploadExcels(LocalDate date) throws Exception;

    /**
     * 分页查询兑换礼物列表
     *
     * @param page
     * @return
     * @throws Exception
     */
    JsonResult getEntityListPage(Page page) throws Exception;

    /**
     * 下载兑换礼物Excel
     *
     * @param id
     * @param downloadId
     * @param res
     * @throws Exception
     */
    void downloadExcel(Long id, Long downloadId, HttpServletResponse res) throws Exception;

    /**
     * 分页查询兑换礼物Excel列表
     *
     * @param page
     * @param searchBy
     * @param condition
     * @param startTime
     * @param endTime
     * @return
     */
    JsonResult getExchangeGiftPage(Page page, Integer searchBy, String condition, String startTime, String endTime);

}
